//
//  PayMoneyNewDegreeNumTableViewCell.m
//  PropertyManager
//
//  Created by TNG on 2018/8/1.
//  Copyright © 2018年 Tng. All rights reserved.
//

#import "PayMoneyNewDegreeNumTableViewCell.h"

@implementation PayMoneyNewDegreeNumTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

-(instancetype) initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self creatUI];
        self.selectionStyle = UITableViewCellSelectionStyleNone;
    }
    return self;
}

-(void)creatUI{
    [self.contentView addSubview:self.moneyLabel];
//    [self.contentView addSubview:self.lastDegreeLabel];
//    [self.contentView addSubview:self.lastDegreeNumLabel];
//    [self.contentView addSubview:self.currentDegreeLabel];
//    [self.contentView addSubview:self.currentDegreeNumLabel];
//    [self.contentView addSubview:self.numLabel];
//    [self.contentView addSubview:self.degreeNumLabel];
}

-(UILabel *)moneyLabel
{
    if (_moneyLabel == nil) {
        _moneyLabel = [[UILabel alloc] initWithFrame:CGRectMake(20, 25, WIDTH - 40, 21)];
        _moneyLabel.font = font(18);
        _moneyLabel.textColor = SFMColor(246, 110, 36);
        _moneyLabel.textAlignment = NSTextAlignmentCenter;
    }
    return _moneyLabel;
}

-(UILabel *)lastDegreeLabel
{
    if (_lastDegreeLabel == nil) {
        _lastDegreeLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 70, WIDTH/3, 20)];
        _lastDegreeLabel.font = font(12);
        _lastDegreeLabel.textColor = SFM153;
        _lastDegreeLabel.text = @"上期读数";
        _lastDegreeLabel.textAlignment = NSTextAlignmentCenter;
    }
    return _lastDegreeLabel;
}

-(UILabel *)lastDegreeNumLabel
{
    if (_lastDegreeNumLabel == nil) {
        _lastDegreeNumLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 92, WIDTH/3, 20)];
        _lastDegreeNumLabel.font = font(16);
        _lastDegreeNumLabel.textColor = SFM51;
        _lastDegreeNumLabel.textAlignment = NSTextAlignmentCenter;
    }
    return _lastDegreeNumLabel;
}

-(UILabel *)currentDegreeLabel
{
    if (_currentDegreeLabel == nil) {
        _currentDegreeLabel = [[UILabel alloc] initWithFrame:CGRectMake(WIDTH/3, 70, WIDTH/3, 20)];
        _currentDegreeLabel.font = font(12);
        _currentDegreeLabel.text = @"本期读数";
        _currentDegreeLabel.textColor = SFM153;
        _currentDegreeLabel.textAlignment = NSTextAlignmentCenter;
    }
    return _currentDegreeLabel;
}

-(UILabel *)currentDegreeNumLabel
{
    if (_currentDegreeNumLabel == nil) {
        _currentDegreeNumLabel = [[UILabel alloc] initWithFrame:CGRectMake(WIDTH/3, 92, WIDTH/3, 20)];
        _currentDegreeNumLabel.font = font(16);
        _currentDegreeNumLabel.textColor = SFM51;
        _currentDegreeNumLabel.textAlignment = NSTextAlignmentCenter;
    }
    return _currentDegreeNumLabel;
}

- (UILabel *)numLabel
{
    if (_numLabel == nil) {
        _numLabel = [[UILabel alloc] initWithFrame:CGRectMake(WIDTH * 2/3, 70, WIDTH/3, 20)];
        _numLabel.font = font(12);
        _numLabel.textColor = SFM153;
        _numLabel.text = @"实际用量";
        _numLabel.textAlignment = NSTextAlignmentCenter;
    }
    return _numLabel;
}

-(UILabel *)degreeNumLabel
{
    if (_degreeNumLabel == nil) {
        _degreeNumLabel = [[UILabel alloc] initWithFrame:CGRectMake(WIDTH * 2/3, 92, WIDTH/3, 20)];
        _degreeNumLabel.font = font(16);
        _degreeNumLabel.textColor = SFM51;
        _degreeNumLabel.textAlignment = NSTextAlignmentCenter;
    }
    return _degreeNumLabel;
}

-(void)send
{
//    self.moneyLabel.text = @"租金：￥45";
//    self.lastDegreeNumLabel.text = @"890度";
//    self.currentDegreeNumLabel.text = @"920度";
//    self.degreeNumLabel.text = @"30度";
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
